package StudyCode.summary.mydatetime;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZonedDateTime;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CurrentDateTime {
	public static void main(String[] args) {
		LocalDate dateOnly = LocalDate.now();
		LocalTime timeOnly = LocalTime.now();
		LocalDateTime dateTime = LocalDateTime.now();
		ZonedDateTime dateTimeWithZone = ZonedDateTime.now();

		System.out.println("当前 Date: " + dateOnly);
		System.out.println("当前 Time: " + timeOnly);
		System.out.println("当前 Date 跟 Time: " + dateTime);
		System.out.println("当前 Date、Time、Zone: " + dateTimeWithZone);
	}
}
